#include "main/utils.h"
using namespace std;

class Solution {
public:
    int digArtifacts(int n, vector<vector<int>>& artifacts, vector<vector<int>>& dig) {
      set<vector<int>> help_set;
      for (auto pos : dig) {
        help_set.insert(pos);
      }
      int count = 0;
      for (auto artifact : artifacts) {
        int flag = 1;
        for (int i = artifact[0]; i <= artifact[2]; ++i) {
          for (int j = artifact[1]; j <= artifact[3]; ++j) {
            if (help_set.find({i, j}) == help_set.end()) {
              flag = 0;
              break;
            }
          }
          if (!flag)
            break;
        }
        if (flag)
          ++count;
      }
      return count;
    }
};

int main() {
  int n = 2;
  vector<vector<int>> artifacts = {{0, 0, 0, 0}, {0, 1, 1, 1}};
  vector<vector<int>> dig = {{0, 0}, {0, 1}, {1, 1}};
  Solution su;
  cout << su.digArtifacts(n, artifacts, dig) << endl;

  return 0;
}
